﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class SelectionSort
{
    static void Main()
    {
        int[] Arr = { 10, 3, 4, 6, 9, 7, 5, 8, 1 };
        int length = Arr.Length;
        for (int downCount = 0; downCount < length - 1; downCount++) 
        {
            for (int uppCount = downCount + 1; uppCount < length; uppCount++) 
            {
                if (Arr[downCount] > Arr[uppCount]) 
                {
                    int tmp = Arr[uppCount];
                    Arr[uppCount] = Arr[downCount];
                    Arr[downCount] = tmp;
                }
            }
        }
        foreach (int show in Arr) 
        {
            Console.WriteLine(show);
        }
    }
}

